<template></template>

<script>
import axios from "axios";
import Qs from 'qs'
import Cookies from "js-cookie";
import { encrypt, decrypt } from "@/utils/jsencrypt";

export default {
  name: "tokenLogout",
  data() {
    return {};
  },
  watch: {
    $route: {
      handler: function (route) {
        console.log(route);
        this.redirect = route.query && route.query.redirect;
      },
      immediate: true,
    },
  },
  created() {
    //获取后台参数
    this.tokenLogout();
  },
  methods: {
    tokenLogout(){
      var portalLoginUrl = this.portalLoginUrl;
      this.$store.dispatch('LogOut').then(() => {
          location.href = portalLoginUrl;
        })
    }
  },
};
</script>

